$(function(){
  $('#js-btn-login').on('click',function(e){
    e.preventDefault()
    let username = $("#username").val()
    let password = $('#password').val()
    let sendData = {
      username:username,
      password:password
    }
    $.ajax({
      type:'POST',
      url:"http://124.223.14.236:3001/api/user/login",
      data:sendData,
      success:function(res){
        console.log(res);
        if (!res.success) {
              return alert("注册失败：" + res.msg)
            }; 
            // location.href = "../regbaseCode/reg.html";
            alert('登录成功')
      }
    })
  

  })
  })